CREATE TABLE jms_dm.dm_dev_center_operate_summary_dt
(
    network_code          varchar(100) COMMENT "到件站点code",
    network_name          varchar(100) COMMENT "到件站点name",
    out_way_num           int(11) COMMENT "出港量",
    out_pack_way_num      int(11) COMMENT "出港卸车包内票量",
    out_zddev_way_num     int(11) COMMENT "出港自动建包量",
    out_rgdev_way_num     int(11) COMMENT "出港人工建包量",
    same_way_num          int(11) COMMENT "同城量",
    same_pack_way_num     int(11) COMMENT "同城卸车包内票量",
    same_zddev_way_num    int(11) COMMENT "同城自动建包量",
    same_rgdev_way_num    int(11) COMMENT "同城人工建包量",
    transfer_way_num      int(11) COMMENT "中转量",
    transfer_pack_way_num int(11) COMMENT "中转卸车包内票量",
    in_way_num            int(11) COMMENT "进港量",
    in_pack_way_num       int(11) COMMENT "进港卸车包内票量",
    in_tear_pack_num      int(11) COMMENT "进港拆包量",
    in_tear_way_num       int(11) COMMENT "进港拆包包内票量",
    in_build_pack_num     int(11) COMMENT "进港建包量",
    in_way_total          int(11) COMMENT "归属进港量",
    out_way_total         int(11) COMMENT "归属出港量",
    date_time             date COMMENT "日期",
    agent_code            varchar(100) COMMENT "代理区code",
    agent_name            varchar(100) COMMENT "代理区name",
    same_city_port_type   varchar(100) COMMENT "同城归属 1：进港 2：出港",
    transfer_port_type    varchar(100) COMMENT "中转归属 1：进港 2：出港"
) ENGINE=OLAP
DUPLICATE KEY(network_code)
COMMENT "设备中转件量分析汇总"
PARTITION BY RANGE(date_time)
(START ('2023-09-01') END ('2023-10-10') EVERY (INTERVAL 1 day)
)
DISTRIBUTED BY HASH(network_code) BUCKETS 1
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-180",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "1",
"in_memory" = "false",
"storage_format" = "V2",
"enable_persistent_index" = "false"
);